﻿<%@ Page Title="" Language="VB" MasterPageFile="~/Devida/Siste.master" AutoEventWireup="false" CodeFile="MantenimientoPoa.aspx.vb" Inherits="Devida_MantenimientoPoa" Theme="Yahoo-Ocean" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="ucAlerta.ascx" TagName="Alerta" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .style2
        {
            width:100%;
        }
        .Frm_Fondo_fila_linea {
	        BACKGROUND-COLOR: #1867B2;
            width: 0;
        }
        .style14
        {
            BACKGROUND-COLOR: #199A44;
            width: 100px;
        }
        .style17
        {
            BACKGROUND-COLOR: #199A44;
            width: 78px;
        }
        .style32
    {
        BACKGROUND-COLOR: #199A44;
        width: 196px;
    }
    .style33
    {
        BACKGROUND-COLOR: #199A44;
        width: 139px;
    }
     .Cabecera
        {
            height: 18px;
            font-weight: bold;
            font-size: 10px;
            color: White; 
            text-align: center;
            text-transform: uppercase;
            background-color: #66CC99;
        }
    </style>
    <base target="_self" />
    <link href="../css/EstilosFrm.css" type="text/css" rel="stylesheet" /> 
    <link href="../css/i_consultas.css" type="text/css" rel="stylesheet" />
    <link href="../css/diseno.css" type="text/css" rel="Stylesheet" />
    <link href="../css/style2.css" type="text/css" rel="stylesheet" />
    <link href="../css/StyleSheet.css" type="text/css" rel="stylesheet" />

     <script src="../js/jsForms/js_Consulta.js" type="text/javascript"></script>
     <script language="javascript" src="../Script/PrintScript.js" type="text/javascript"> </script>
    <script src="../js/js_windowpopup.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
       
        function Resaltar_On(GridView) {
            if (GridView != null) {
                GridView.originalBgColor = GridView.style.backgroundColor;
                GridView.style.backgroundColor = "#5BADFF";
            }
        }

        function Resaltar_Off(GridView) {
            if (GridView != null) {
                GridView.style.backgroundColor = GridView.originalBgColor;
            }
        }
    
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cph_name" Runat="Server">
<asp:Label ID="lb_name" runat="server" Font-Names="Arial"
                        Font-Size="17px" ForeColor="white" Text="Mantenimiento POA" 
                        Font-Bold="True" ></asp:Label>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">   
      <table >                            
          <tr>
              <td>
              <table  cellpadding="0" cellspacing="0" class="style2" >
              <tr>
              <td>
              <div style="border: solid 1px #99aabd; width: 900px; display:none; overflow: auto;" align="center">
                 <table cellpadding="0" cellspacing="0" class="style2">
                      <tr>
                        <td align="center" class="style17" style="border:0.5px solid #FFFFFF">
                            <asp:Label ID="Label11" runat="server" CssClass="frm_formato" ForeColor="White" 
                                Text="Codigo"></asp:Label>
                        </td>
                        <td align="center" class="style33" style="border:0.5px solid #FFFFFF">
                            <asp:Label ID="Label12" runat="server" CssClass="frm_formato" ForeColor="White" 
                                Text="Proyectos / Actividades"></asp:Label>
                        </td>
                        <td align="center" class="style32" style="border:0.5px solid #FFFFFF">
                            <asp:Label ID="Label17" runat="server" CssClass="frm_formato" ForeColor="White" 
                                Text="Periodo"></asp:Label>
                        </td>
                        <td align="center" class="style14" style="border:0.5px solid #FFFFFF">
                            <asp:Label ID="Label20" runat="server" CssClass="frm_formato" ForeColor="White" 
                                Text="PPER"></asp:Label>
                        </td>
                     </tr>
                 </table>
              </div>
              </td>
               </tr>                                                           
                </table>
              </td>
          </tr>
          <tr>
           <td>
           <div style="border: solid 1px #99aabd; width: 900px;  overflow: auto;" >
               <table cellpadding="0" cellspacing="0" class="style2">
                   <tr style="vertical-align: middle">
                       <td style="width: 70px" align="left">
                           <asp:Label ID="Label1" runat="server" CssClass="label" Text="  PPER:    "></asp:Label>
                       </td>
                       <td style="text-align: left; width: 120px">
                           <asp:DropDownList ID="ddlPPER" runat="server" CssClass="ddl" Width="100px" AutoPostBack="true">
                           </asp:DropDownList>
                       </td>
                       <td align="left" style="width: 80px">
                           <asp:Label ID="Label2" runat="server" CssClass="label" Text="Ejecutor"></asp:Label>
                       </td>
                       <td align="left">
                           <asp:UpdatePanel ID="upEjecutor" runat="server">
                               <ContentTemplate>
                                   <asp:DropDownList ID="ddlEjecutor" runat="server" CssClass="ddl" Width="368px">
                                   </asp:DropDownList>
                               </ContentTemplate>
                               <Triggers>
                                   <asp:AsyncPostBackTrigger ControlID="ddlPPER" EventName="SelectedIndexChanged" />
                               </Triggers>
                           </asp:UpdatePanel>
                       </td>
                       <td style="width: 60px" align="right">
                           <asp:Label ID="Label3" runat="server" CssClass="label" Text="  POA - "></asp:Label>
                       </td>
                       <td align="left">
                           <asp:TextBox ID="txtPOA" runat="server" CssClass="frm_formato_caja" Width="85px"
                               MaxLength="4">
                           </asp:TextBox>
                           <cc1:FilteredTextBoxExtender ID="ftbPOA" TargetControlID="txtPOA" runat="server"
                               FilterType="Numbers">
                           </cc1:FilteredTextBoxExtender>
                       </td>
                       <td style="width: 10px">
                           <asp:ImageButton ID="boton_busca" runat="server" ToolTip="Buscar" ImageUrl="~/Imagenes/btn_acclupa.jpg"
                               Width="22px" />
                       </td>
                   </tr>
                   <tr>
                       <td style="width: 70px" align="left">
                           <asp:Label ID="lblNombrePoa" runat="server" CssClass="label" Text="  Nombre: "></asp:Label>
                       </td>
                       <td colspan="3" style="width: 600px" align="left">
                           <asp:TextBox ID="txt_NombrePoa" runat="server" CssClass="frm_formato_caja" Width="565px"></asp:TextBox>
                       </td>
                       <td align="right" style="width: 60px">
                           <asp:Label ID="lbl_busqueda" runat="server" CssClass="label" Text="Año"></asp:Label>&nbsp;&nbsp;&nbsp;
                       </td>
                       <td align="left">
                           <asp:DropDownList ID="ddl_anhio" runat="server" CssClass="ddl" AutoPostBack="True">
                           </asp:DropDownList>
                       </td>
                       <td style="width: 10px">
                       <asp:ImageButton ID="btnLimpiar" runat="server" ToolTip="Limpiar" ImageUrl="~/Imagenes/btn_acc_borrar.jpg"
                               Width="22px" />
                       </td>
                   </tr>
               </table>
           </div>
           </td>
         </tr>
          <tr>
              <td>
              </td>
          </tr>
          <tr>
            <td>
                <table cellpadding="0" cellspacing="0" style="width: 900px; height: 300px;">
                 <tr>
                   <td>
                       <div style="border: solid 1px #99aabd; width: 900px; height: 350px; overflow: auto;"
                                    align="center">
                                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                                        <ContentTemplate>
                                            <div id="div_grilla" runat="server" align="center" onscoll="">

                                                <asp:GridView ID="gv_impresion" runat="server" AutoGenerateColumns="False" ShowHeader="true"
                                                    CellPadding="0" CellSpacing="0" CssClass="grid" Font-Size="8pt" GridLines="Vertical"
                                                    Width="1550px">
                                                    <RowStyle BackColor="#F7F6F3" Font-Bold="False" ForeColor="#333333" VerticalAlign="Top" />

                                                    <Columns>

                                                       <asp:TemplateField ItemStyle-Width="10px">
                                                            
                                                            <HeaderTemplate>
                                                                N°
                                                            </HeaderTemplate>
                                                            
                                                            <ItemTemplate>
                                                                <%# Container.DataItemIndex + 1%>                                                            
                                                            </ItemTemplate>

                                                       </asp:TemplateField>

<%--                                                    El DataField="POA" se carga directamente con el campo que viene de la base de datos... es decir
                                                        debe existir en el query una columna llamada #POA"--%>
                                                        <asp:BoundField HeaderText="Poa" DataField="POA" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="50px" />
                                                        
                                                        <asp:BoundField HeaderText="Año firma" DataField="ANHIO_FIRMA_POA" ItemStyle-HorizontalAlign="Center"
                                                            ItemStyle-Width="10px" />

                                                        <asp:TemplateField>

                                                            <HeaderTemplate>
                                                                PPER
                                                            </HeaderTemplate>
                                                            <ItemStyle Width="50px" HorizontalAlign="Left" />

                                                            <ItemTemplate>
                                                                <asp:Label ID="lblPPER" runat="server" Text='<%# Eval("ABREVIATURA") %>'></asp:Label>
                                                                <asp:HiddenField ID="POA" runat="server" Value='<%# Eval("POA") %>' /> <%--Campo oculto--%>
                                                                <asp:HiddenField ID="hfVersion" runat="server" Value='<%# Eval("VERSION") %>' /> <%--Campo oculto--%>
                                                                <asp:HiddenField ID="EstadoReprog" runat="server" Value='<%# Eval("ESTADO_REPROG")%>' />
                                                            </ItemTemplate>

                                                        </asp:TemplateField>

                                                        <asp:BoundField HeaderText="Ejecutor" DataField="EJE_DES" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="150px" />
                                                        <asp:BoundField HeaderText="Nombre" DataField="NOMBRE" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="380px" />
                                                        <asp:BoundField HeaderText="Tipo Proyecto Actividad" DataField="DESCRIPCION" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="100px" />
                                                        <asp:BoundField HeaderText="Estado" DataField="ESTADO" ItemStyle-HorizontalAlign="Left"
                                                            HtmlEncode="false" />
                                                        <asp:BoundField HeaderText="Estado Ing/Prog/Reprog" DataField="ESTADO_REPROG" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" 
                                                            HtmlEncode="false" />
                                                        <asp:BoundField HeaderText="T. POA (Versión)" DataField="TIPO_CAMBIO" ItemStyle-HorizontalAlign="LEFT"
                                                            ItemStyle-Width="87px" />
                                                        <asp:BoundField HeaderText="Fecha Viabilidad" DataField="Fecha_Viabilidad" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="82px" HtmlEncode="false" DataFormatString="{0:dd/MM/yyyy}" />
                                                        <asp:BoundField HeaderText="Monto Total Invertido" DataField="Monto_Total_Invertido"
                                                            ItemStyle-HorizontalAlign="Right" ItemStyle-Width="100px" HtmlEncode="false"
                                                            DataFormatString="{0:N0}" />
                                                        <asp:BoundField HeaderText="Monto Invertido Año" DataField="Monto_Inv_Anhio" ItemStyle-HorizontalAlign="Right"
                                                            ItemStyle-Width="100px" HtmlEncode="false" DataFormatString="{0:N0}" />
                                                        <asp:BoundField HeaderText="Ambito de Intervencion" DataField="ubigeo" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="160px" />
                                                        <asp:BoundField HeaderText="Monitoreador" DataField="MONITOREADOR" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="120px" />
                                                        <asp:BoundField HeaderText="Especialista" DataField="ESPECIALISTA" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="120px" />
                                                        <asp:BoundField HeaderText="SNIP" DataField="SNIP" ItemStyle-HorizontalAlign="Left"
                                                            ItemStyle-Width="50px" />
                                                        <asp:CommandField ShowSelectButton="false" Visible="False" />
                                                    
                                                    </Columns>
                                                    <SelectedRowStyle BackColor="#5BADFF" Font-Bold="True" ForeColor="#333333" />
                                                    <AlternatingRowStyle BackColor="#CEDAF2" ForeColor="#003366" />
                                                </asp:GridView>
                                            </div>
                                        </ContentTemplate>
                                        <Triggers>
                                            <asp:AsyncPostBackTrigger ControlID="gv_impresion" EventName="SelectedIndexChanged" />
                                        </Triggers>
                                    </asp:UpdatePanel>
                        </div>
                   </td>
                 </tr>
                </table>
            </td>
          </tr>    
          <tr>
          <td>
              <table width="900px" cellpadding="0" cellspacing="0">
                  <tr>
                      <td width="150px" align="left">
                          <asp:ImageButton ID="ibnuevoPoa" runat="server" ImageUrl="~/Imagenes/btnNuevo.png"
                              ToolTip="Crear Nuevo Poa" />
                      </td>
                      <td width="150px" align="right">
                          <asp:ImageButton ID="btn_modificar" runat="server" ImageUrl="~/Imagenes/btnmodificar.png"
                              ToolTip="Modificar Poa" />
                        <%--<cc1:ModalPopupExtender ID="mpeMensaje" runat="server" BackgroundCssClass="modalBackground"
                                                DynamicServicePath="" Enabled="True" CancelControlID="btnCancel" OkControlID="btnSeguir"
                                                PopupControlID="PNL2" TargetControlID="btn_modificar" PopupDragHandleControlID="hand7">
                                            </cc1:ModalPopupExtender>--%>
                                            <%--<cc1:ConfirmButtonExtender ID="cfeMensaje" runat="server" ConfirmText="" DisplayModalPopupID="mpeMensaje"
                                                Enabled="True" TargetControlID="btn_modificar">
                                            </cc1:ConfirmButtonExtender>--%>
                                            <%--<asp:Button ID="btn_regabierta" runat="server" Text="reg. abierta" Visible="true"
                                                Style="display: none;" />--%>
                          
                      </td>
                      <td width="150px" align="right">
                          <asp:ImageButton ID="btnHistorial" runat="server" ImageUrl="~/Imagenes/btnHistorial.png"
                              ToolTip="Ver Historial" />
                      </td>
                      <td width="150px" align="right">
                          <asp:ImageButton ID="btn_reprogramar" runat="server" ImageUrl="~/Imagenes/btnReprogramar.png"
                              ToolTip="Reprogramar" />
                      </td>
                      <td width="150px" align="right">
                          <asp:ImageButton ID="btn_reformular" runat="server" ImageUrl="~/Imagenes/btnReformular.png"
                              ToolTip="Reprogramar" />
                      
                      </td>
                      <td width="150px" align="right">
                          <asp:ImageButton ID="ibn_salir" runat="server" ImageUrl="~/Imagenes/btnSalir.png"
                              ToolTip="Salir" />
                      </td>
                  </tr>
                  <tr>
                      <td align="right" colspan="6">
                          <asp:ImageButton ID="ibCodigos" runat="server" Visible="true" Enabled="true" ImageUrl="~/Imagenes/layout_edit.png" 
                          ToolTip="Ingreso de Códigos de Componentes y Metas Físicas"/>
                      </td>
                  </tr>
              </table>
          </td>
        </tr>
    </table>
  <uc1:alerta id="alerta" runat="server"></uc1:alerta>
</asp:Content>